package com.pattern.strategy.practice1;

/**
 * <p>
 *
 * </p>
 *
 * @author qingshan
 * @since 2021/3/30 4:54 下午
 */
//public class Environment implements IStrategy{  // 与下面不实现IStrategy的区别或优劣？？？
public class Environment {

    IStrategy strategy;

    public Environment(IStrategy strategy) {
        this.strategy = strategy;
    }

    public int calculate(int a, int b) {
        return strategy.calculate(a, b);
    }

}
